#!/bin/bash

pass=0
fail=0

echo "Test Case 1: Testing 23/23..."

tc=`java -jar Grades_v2.jar 23 23`

if [ "$tc" = "Component Fail" ]
  then
 echo "Test Passed"
pass=$((pass+1))
else
echo "Test Failed"
fail=$((fail+1))
fi


echo "Test Case 2: Testing 80/79..."

tc=`java -jar Grades_v2.jar 80 79`

if [ "$tc" = "Pass" ]
  then
  echo "Test Passed"
pass=$((pass+1))
else
echo "Test Failed"
fail=$((fail+1))
fi



echo "Test Case 3: Testing 100/100..."

tc=`java -jar Grades_v2.jar 100 100`

if [ "$tc" = "Pass with Distinction" ]
  then
  echo "Test Passed"
pass=$((pass+1))
else
echo "Test Failed"
fail=$((fail+1))
fi



echo "Test Case 4: Testing 00/00..."

tc=`java -jar Grades_v2.jar 00 00`

if [ "$tc" = "Component Fail" ]
  then
  echo "Test Passed"
pass=$((pass+1))
else
echo "Test Failed"
fail=$((fail+1))
fi



echo "Test Case 5: Testing 41/41..."

tc=`java -jar Grades_v2.jar 41 41`

if [ "$tc" = "Fail" ]
  then
  echo "Test Passed"
pass=$((pass+1))
else
echo "Test Failed"
fail=$((fail+1))
fi

echo "Test Case 6: Testing -1/99..."

tc=`java -jar Grades_v2.jar -1 99`

if [ "$tc" = "Fail" ] 
  then
  echo "Test Passed"
pass=$((pass+1))
else
echo "Test Failed"
fail=$((fail+1))
fi


echo fail $fail
echo pass $pass


